<!-- 体征里2级路由VS页面 -->
<template>
  <div id="SignVs">
    <div class="signsInformation">
      <signsinformation></signsinformation>
    </div>
    <div class="vsContent">
      <div class="link-list center-block">
        <router-link
          v-for="(item,index) in list"
          :key="item.value"
          :to="{path:item.path,query:{ind:index,item:5}}"
          :class="{'router-link-exact-active':ind == index}"
          @click.native="changeBgc(index)"
        >{{item.label}}</router-link>
      </div>
      <router-view></router-view>
    </div>
  </div>
</template>
<script>
import signsinformation from "@/components/sign/signsInformation";

export default {
  data() {
    return {
      signData: {},
      list: [
        {
          path: "/physicalSignPage/signsVs/signsVsSubSurface",
          label: "趋势表"
        },
        { path: "/physicalSignPage/signsVs/signsVsSubChart", label: "趋势图" }
      ],
      ind: "0"
    };
  },
  mounted() {
    if (this.$route.query.ind) {
      this.ind = this.$route.query.ind;
    } else {
      this.ind = 0;
    }
  },
  methods: {
    changeBgc(index) {
      this.ind = index;
    }
  },
  components: {
    signsinformation
  }
};
</script>
<style scoped>
#SignVs {
  padding-left: 45px;
  margin-top: -12px;
}
.signsInformation {
  margin-bottom: 15px;
}
.link-list {
  height: 30px;
  line-height: 30px;
  margin-bottom: 10px;
}
.link-list a {
  font-size: 16px;
  display: inline-block;
  margin-right: 15px;
  color: #666;
}
.link-list a:after {
  display: inline-block;
  content: "";
  width: 1px;
  height: 20px;
  background-color: #ccc;
  margin-left: 10px;
  vertical-align: middle;
}
.link-list a:last-child:after {
  width: 0;
}
.link-list a.router-link-exact-active {
  color: #11a7f3;
}
.table > thead > tr > th {
  border-bottom: none;
}

.vsThead,
.vsTbody {
  width: 100%;
  /*border:1px solid #f4f4f4;*/
  border-top: none;
}

.vsContent {
  position: relative;
  margin-top: -10px;
  padding-right: 30px;
}

.table {
  margin-bottom: 0;
}

.vsThead thead tr {
  height: 42px;
  line-height: 42px;
  background-color: #11a7f3;
  color: #fff;
}

.vsThead > thead > tr > th {
  border-bottom: none;
}

.vsTbody {
  max-height: calc(100vh - 430px);
  overflow-y: auto;
  border: 1px solid #ddd;
}

.vsTbody tbody tr td {
  padding: 10px 0;
  vertical-align: middle;
  border-top: 1px solid #ddd;
  color: #333;
}

.vsTbody tbody > tr:first-child > td {
  border-top: none;
}
</style>
